-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] adding new PUT trained model vocabulary endpoint #77387
Conversation
Pinging @elastic/clients-team (Team:Clients) |
Pinging @elastic/ml-core (Team:ML) |
docs/reference/ml/df-analytics/apis/put-trained-model-vocabulary.asciidoc
Show resolved
Hide resolved
…ry.asciidoc Co-authored-by: Lisa Cawley <lcawley@elastic.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
"parts":{ | ||
"model_id":{ | ||
"type":"string", | ||
"description":"The ID of the trained model for this definition part" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description":"The ID of the trained model for this definition part" | |
"description":"The ID of the trained model for this vocabulary" |
if ((inferenceConfig instanceof NlpConfig) == false) { | ||
listener.onFailure( | ||
new ElasticsearchStatusException( | ||
"cannot put vocabulary for model [{}] as it is not an nlp model", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nlp or NLP?
It's NLP in the docs but there is not a precedent in code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error messages are simply docs for failures :). So, I can switch it to be NLP
.
parser.declareObject( | ||
ConstructingObjectParser.optionalConstructorArg(), | ||
(p, c) -> { | ||
if (ignoreUnknownFields == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ the caller can't set this but the code creates the config so it is visible
This commit removes the ability to set the vocabulary location in the model config.
This opts instead for sane defaults to be set and used. Wrapping this up in an
API.
The index is now always the internally managed
.ml-inference-native
indexand the document ID is always
<model_id>_vocabulary
This API only works for pytorch/nlp type models.